import Vue from 'vue'
import Router from 'vue-router'
import Goods from '@/components/goods/goods'
import Bxnumber from '@/components/bxnumber/bxnumber'
import Blance from '@/components/balance/balance'

Vue.use(Router)

// 编程式跳转使用this.$router.push()
export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      redirect: '/bxnumber'
    },
    {
      path: '/bxnumber',
      name: 'bxid',
      component: Bxnumber
    },
    {
      path: '/goods',
      name: 'goods',
      component: Goods
    },
    {
      path: '/balance',
      name: 'balance',
      component: Blance
    }
  ],
   // 定义激活路由的样式
  linkActiveClass: 'active'
})
